<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%
	StringBuffer strURL = request.getRequestURL();
	String URL = strURL.toString();
	String contPath = request.getContextPath();
	int nIndex = URL.indexOf(contPath);
	URL = "http://tugo.cn/weixin_aef/";
	%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport"
	content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="stylesheet" href="<%=URL%>newedition/css/aui.css" />
<link rel="stylesheet" href="<%=URL%>newedition/css/iconfont.css" />
<link rel="stylesheet" href="<%=URL%>newedition/css/aui-slide.css" />
<link rel="stylesheet"
	href="<%=URL%>newedition/css/user_infoList.css" />
<link rel="stylesheet"
	href="<%=URL%>newedition/css/aui-pull-refresh.css" />
<script type="text/javascript" src="<%=URL%>newedition/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="<%=URL%>js/cookies.js?version=1.1"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/aui-pull-refresh.js"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/doRefresh.js"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/aui-pull-refresh.js"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/doRefresh.js"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/aui-dialog.js"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/aui-toast.js"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/auipopupstyle.js"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/aui-slide.js"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/base.js?version=3.4"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/recycle/user_infoNotes.js"></script>
<script type="text/javascript" src="<%=URL%>js/doT.min.js"></script>
		<title>用户资料详情</title>
	</head>

	<body>
		<header class="aui-bar aui-bar-nav">
			<%-- <a class="aui-pull-left aui-btn" href="<%=URL%>weixinuser/newhtml/user_infoList.jsp">
				<span class="aui-iconfont aui-icon-left"></span>
			</a> --%>
			<div class="aui-title">个人资料</div>
			<a class="aui-pull-right aui-btn">
				<span class="aui-iconfont aui-icon-more"></span>
			</a>
		</header>
		<div class="body-box aui-content-padded  aui-refresh-content">
			<div class="aui-content aui-margin-b-15">
				<ul class="aui-list aui-media-list">
					<li class="aui-list-item aui-list-item-middle">
						<div class="aui-media-list-item-inner">
							<div class="aui-list-item-inner">
								头像
							</div>
							<div class="aui-list-item-inner aui-list-item-arrow" style="width: 4rem;">
								<img src="" id="heard" class="aui-img-round aui-list-img-sm">
							</div>
						</div>
					</li>
					<li class="aui-list-item aui-list-item-middle">
						<div class="aui-media-list-item-inner">
							<div class="aui-list-item-media">
								姓名
							</div>
							<div id="realname" class="aui-list-item-inner aui-list-item-arrow" style="text-align: right;color: #8f8f8f;">
								王佳
							</div>
						</div>
					</li>
					<li class="aui-list-item aui-list-item-middle">
						<div class="aui-media-list-item-inner">
							<div class="aui-list-item-media">
								角色
							</div>
							<div id="role_name" class="aui-list-item-inner aui-list-item-arrow" style="text-align: right;color: #8f8f8f;">
								售油商
							</div>
						</div>
					</li>
					<li class="aui-list-item aui-list-item-middle">
						<div class="aui-media-list-item-inner">
							<div class="aui-list-item-media">
								地址
							</div>
							<div id="address" class="aui-list-item-inner aui-list-item-arrow" style="text-align: right;color: #8f8f8f;">
								重庆市九龙坡区石桥铺
							</div>
						</div>
					</li>
				</ul>
			</div>
			<div class="aui-content aui-margin-b-15">
				<ul class="aui-list aui-media-list">
					<li class="aui-list-item aui-list-item-middle">
						<div class="aui-media-list-item-inner">
							<div class="aui-list-item-media">
								电话
							</div>
							<div id="phone" class="aui-list-item-inner aui-list-item-arrow" style="text-align: right;color: #8f8f8f;">
								15888888888
							</div>
						</div>
					</li>
					<li class="aui-list-item aui-list-item-middle">
						<div class="aui-media-list-item-inner">
							<div class="aui-list-item-media">
								个性签名
							</div>
							<div id="remarks" class="aui-list-item-inner aui-list-item-arrow" style="text-align: right;color: #8f8f8f;">
								未填写
							</div>
						</div>
					</li>
				</ul>
			</div>
		</div>
	</body>

	<script>
		dorefresh();
		$(function(){
			GetSingleOpenId(getCookie("openid")) 
			if(getCookie("mobiletokenuser")==""){
			}
			else{
				GetCurrentUserInfoForWeiXin()
			}
		})
		/**
		 * 获取登录用户的信息
		 * @returns
		 */
		 function GetCurrentUserInfoForWeiXin(){
				var json = {
						"userId": ""+getCookie("userid")+""
					}
					$.ajax({
						cache: false,
						type: "post",
						datatype: 'json',
						contentType: 'application/json;charset=UTF-8',
						url: ''+httpipstr+'alfa-mobile-ws/rest/user/GetCurrentUserInfoForWeiXin?mobiletoken='+getCookie("mobiletokenuser")+'',
						data: JSON.stringify(json),
						success: function(data) {
							if(data.message=="1"){
								$("#heard").attr('src',data.data.headimgurl); 
								$("#realname").html(data.data.realname); 
								$("#role_name").html(data.data.role_name); 
								$("#address").html(data.data.address); 
								$("#phone").html(data.data.phone); 
								$("#remarks").html((!data.data.remarks ||data.data.remarks=="undefined"? "无" : ""+value.realnum+"")); 
							}else{
								
							}
						}
					})
			}
	</script>
</html>